var app = getApp();
var constract = require('../../../../utils/constract.js');
Page({
  data: {},
  onLoad: function (options) {
    var that = this;
    var id = options.id;
    that.setData({
      id: id
    })
  },
  onShow: function () {
    var that = this;
    var id = that.data.id;
    app.Verification(function (token) {
      wx.request({
        url: constract.invoiceDetai,
        header: { token: token },
        data: { id: id },
        success: function (res) {
          that.setData({
            detail: res.data.data
          })
        }
      });
    })
  },
  onShareAppMessage: function () {
    var id = this.data.id;
    return {
      title: '公司发票详情！',
      path: '/pages/mine/bill/share-bill/share-bill?id=' + id
    }
  }
})